package com.test.tool.demo;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.Bean;
import org.springframework.scheduling.annotation.EnableAsync;

@EnableDiscoveryClient
//@EnableEhomeResourceServer
@SpringBootApplication
@EnableAsync
public class DemoApplication {

    @Bean
    public TerryTest terryTest(){//这里的方法名称是Department类Bean的ID
        return new TerryTest();
    }



    public static void main(String[] args) throws Exception {
        ApplicationContext context = SpringApplication.run(DemoApplication.class, args);
//        System.out.println(context.getBeansOfType(RedisUtil.class));
//        System.out.println(context.getBean("&terryTest"));
//        FactoryBean bean = (FactoryBean) context.getBean("&terryTest");
//        System.out.println(bean.getObject());
    }

}
